package com.jz.community.moduleshopping.orderList.view;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.widget.Button;
import android.widget.ImageView;

import com.jz.community.moduleshopping.R;

public class ReceivingGoodsDialog extends Dialog {


    Button btnConfirmReceipt;
    ImageView ivExit;
    private Context context;
    IConfirmReceipt iConfirmReceipt;

    public ReceivingGoodsDialog(@NonNull Context context, IConfirmReceipt iConfirmReceipt) {
        super(context, R.style.Currency_Dialog);
        this.context = context;
        this.iConfirmReceipt = iConfirmReceipt;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.module_shopping_dialog_receiving_goods);
        btnConfirmReceipt = findViewById(R.id.btn_confirm_receipt);
        ivExit = findViewById(R.id.iv_exit);
        btnConfirmReceipt.setOnClickListener(v -> {
            iConfirmReceipt.ConfirmReceipt();
            dismiss();
        });
        ivExit.setOnClickListener(v -> dismiss());
    }

    public interface IConfirmReceipt {
        void ConfirmReceipt();
    }

}
